Add documentation about "Nested template" feature.#479
Conversation
|
Are you sure this belongs in the language specification? If it is a limitation of the current implementation, it should be clearly noted that these restrictions will go away in the future. |
|
@CyberShadow To explain about language/implementation limitation is much better than nothing is written. I'm placed the description under the "Limitation" section. On the other hand, I don't know the limitation can be surely resolved in the future. See issue 5710 for the detailed discussion. |
Sorry, didn't see that. Thanks.
Thanks, that was insightful. But I do not see any conceptual problems:
|
Current ABI specification describes that member functions and nested functions are called by exactly same call convention, and it is strongly tied to the delegate object memory layout. That is why fixing alias parameter issue will change the delegate memory layout. |
|
Sorry if I wasn't clear - I meant to delay solving the problem of taking the address of a function with multiple context pointers. Calling the function directly can use any calling convention that the implementation wants. This will also be an opportunity to improve the error message: e.g. when you try to take the address of such a function, the compiler could say: BTW, in the original issue I brought up the function was getting called in CTFE, so there it's not even a question of codegen, just semantics. |
|
LGTM, please rebase |
|
Why close the pull though? |
I didn't mean to. |
template.dd
Outdated
There was a problem hiding this comment.
s/just same as member/just the same as a member/
|
otherwise lgtm at least for now |
|
Thanks for many corrections. Updated. |
Add documentation about "Nested template" feature.
|
Thanks! |
From the discussion in issue 11946, I felt necessity of clear documentation about "Nested Templates" feature.
Note that, this is not a new feature from 2.065. it has been existed from early D2 age, although it was not well documented.